#ifndef CHARACTERCLASS_H
#define CHARACTERCLASS_H


#include "dtwenty_global.h"


#include <datasuite.h>


#include <QSharedData>
#include <QSharedDataPointer>


class CharacterClasses;


class DTWENTYSHARED_EXPORT CharacterClass : public DataSuite
{
    Q_OBJECT

    class Data : public QSharedData
    {
    public:
        Data() {}
        Data(const Data& other) : QSharedData(other)
        {
            hitdie = other.hitdie;
            skillpoints = other.skillpoints;
        }

        QVariant hitdie;
        QVariant skillpoints;
    };

    Q_PROPERTY(int hitdie READ hitDie WRITE setHitDie)
    Q_PROPERTY(int skillpoints READ skillPoints WRITE setSkillPoints)

public:

//    enum Field
//    {
//        Field_FIRST = DataContainer::Field_LAST+1,
//        Field_HITDIE = Field_FIRST,
//        Field_SKILLPOINTS,
//        Field_LAST = Field_SKILLPOINTS
//    };

    Q_INVOKABLE CharacterClass(DataSuite *parent = 0);
    CharacterClass(const CharacterClass& other);

    virtual int internalFieldCount() const;

    int hitDie() const;
    void setHitDie(int hitdie);

    int skillPoints() const;
    void setSkillPoints(int skillpoints);




private:

    QSharedDataPointer<Data> d;


};


Q_DECLARE_METATYPE(CharacterClass*)


#endif // CHARACTERCLASS_H
